<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>

</head>
<body>
<div id="header">
  <h2 @click="hand">{{msg}}</h2>    //模板指令  v-on = @
</div>
<script>
  new Vue({
    el:"#header",
    data:{
      msg:"hello",
    },
    methods:{
      hand:function(){
        this.msg="world"
      }
    },

  })
</script>
</body>
</html>
